<template>
  <div class="transaction-list">
    <el-page-header class="page-header" @back="$router.go(-1)" content="交易管理" />

    <el-card class="operation-card">
      <div class="button-group">
        <!-- 存款按钮 -->
        <el-button
            type="primary"
            size="large"
            @click="$router.push('/transactions/deposit')"
            class="operation-button"
        >
          <el-icon class="button-icon"><Plus /></el-icon>
          <span>存款</span>
        </el-button>

        <!-- 取款按钮 -->
        <el-button
            type="danger"
            size="large"
            @click="$router.push('/transactions/withdraw')"
            class="operation-button"
        >
          <el-icon class="button-icon"><Minus /></el-icon>
          <span>取款</span>
        </el-button>

        <!-- 转账按钮 -->
        <el-button
            type="warning"
            size="large"
            @click="$router.push('/transactions/transfer')"
            class="operation-button"
        >
          <el-icon class="button-icon"><Refresh /></el-icon>
          <span>转账</span>
        </el-button>
      </div>
    </el-card>
  </div>
</template>

<script>
import { ref } from 'vue'
import {
  Plus,
  Minus,
  Refresh
} from '@element-plus/icons-vue'

export default {
  name: 'TransactionList',
  components: {
    Plus,
    Minus,
    Refresh
  },
  setup() {
    return {
      // 保留基本响应式数据，即使当前未使用
      loading: ref(false)
    }
  }
}
</script>

<style scoped>
.transaction-list {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 20px;
}

.operation-card {
  margin-bottom: 20px;
  border-radius: 8px;
}

.button-group {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.operation-button {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  height: 100px;
  font-size: 18px;
  display: flex;
  flex-direction: column;
}

.button-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .operation-button {
    width: 100%;
    max-width: none;
  }
}
</style>